﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using IPCommon;

namespace LibraryMain
{
    public partial class f000_menu : Form
    {
        public f000_menu()
        {
            InitializeComponent();
            format_control();
        }

        #region Public Interface
        public void display()
        {
            this.ShowDialog();
        }
        #endregion

        #region Private Methods
        private void format_control()
        {
            set_define_events();
        }
        private void set_define_events()
        {
            this.m_menu_loai_tu_dien.Click += new System.EventHandler(this.m_menu_loai_tu_dien_Click);
            this.m_menu_tu_dien.Click += new System.EventHandler(this.m_menu_tu_dien_Click);
            this.m_menu_tac_gia.Click += new System.EventHandler(this.m_menu_tac_gia_Click);
            this.m_menu_cuon_sach.Click += new EventHandler(m_menu_cuon_sach_Click);
            this.m_menu_dau_sach.Click += new EventHandler(m_menu_dau_sach_Click);
            this.m_menu_tua_sach.Click += new EventHandler(m_menu_tua_sach_Click);
            this.m_menu_phieu_dang_ky.Click += new EventHandler(m_menu_phieu_dang_ky_Click); 
            this.m_menu_dang_ky_dau_sach.Click+=new EventHandler(m_menu_dang_ky_dau_sach_Click);
            this.m_menu_phieu_muon.Click+=new EventHandler(m_menu_phieu_muon_Click);
            this.m_menu_muon_cuon_sach.Click+=new EventHandler(m_menu_muon_cuon_sach_Click);
            this.m_menu_quan_ly_tra_sach.Click+=new EventHandler(m_menu_quan_ly_tra_sach_Click);
            this.m_menu_doc_gia.Click+=new EventHandler(m_menu_doc_gia_Click);

        }
        #endregion

        #region Events
        private void m_menu_loai_tu_dien_Click(object sender, EventArgs e)
        {
            try
            {
                f001_CM_DM_LOAI_TD v_frm = new f001_CM_DM_LOAI_TD();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_tac_gia_Click(object sender, EventArgs e)
        {
            try
            {
                f005_V_DM_TAC_GIA v_frm = new f005_V_DM_TAC_GIA();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_tu_dien_Click(object sender, EventArgs e)
        {
            try
            {
                f002_V_CM_DM_TU_DIEN v_frm = new f002_V_CM_DM_TU_DIEN();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_cuon_sach_Click(object sender, EventArgs e)
        {
            try
            {
                f003_V_DM_CUON_SACH v_frm = new f003_V_DM_CUON_SACH();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_dau_sach_Click(object sender, EventArgs e)
        {
            try
            {
                f004_V_DM_DAU_SACH v_frm = new f004_V_DM_DAU_SACH();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_tua_sach_Click(object sender, EventArgs e)
        {
            try
            {
                f006_V_DM_TUA_SACH v_frm = new f006_V_DM_TUA_SACH();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_phieu_dang_ky_Click(object sender, EventArgs e)
        {
            try
            {
                f007_V_GD_PHIEU_DANG_KY v_frm = new f007_V_GD_PHIEU_DANG_KY();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_dang_ky_dau_sach_Click(object sender, EventArgs e)
        {
            try
            {
                f008_V_GD_PHIEU_DANG_KY_DETAIL v_frm = new f008_V_GD_PHIEU_DANG_KY_DETAIL();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_phieu_muon_Click(object sender, EventArgs e)
        {
            try
            {
                f009_V_GD_PHIEU_MUON v_frm = new f009_V_GD_PHIEU_MUON();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_muon_cuon_sach_Click(object sender, EventArgs e)
        {
            try
            {
                f010_V_GD_PHIEU_MUON_DETAIL v_frm = new f010_V_GD_PHIEU_MUON_DETAIL();
                v_frm.display_for_muon_sach();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_quan_ly_tra_sach_Click(object sender, EventArgs e)
        {
            try
            {
                f010_V_GD_PHIEU_MUON_DETAIL v_frm = new f010_V_GD_PHIEU_MUON_DETAIL();
                v_frm.display_for_tra_sach();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_menu_doc_gia_Click(object sender, EventArgs e)
        {
            try
            {
                f011_V_DM_DOC_GIA v_frm = new f011_V_DM_DOC_GIA();
                v_frm.display();
            }
            catch (Exception v_e)
            {
                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        #endregion



    }
}
